package com.dk.file.config;

import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QiniuYunConfig {

    @Bean
    public UploadManager uploadManager(){
        //1.构造一个带指定 Region 对象的配置类
        com.qiniu.storage.Configuration cfg = new com.qiniu.storage.Configuration(Region.huanan());
        //2.创建一个上传的对象
        return new UploadManager(cfg);
    }
}
